﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Net5ApiAndEfMySql.DtoModel;
using Net5ApiAndEfMySql.Service;
using VueAndNetCoreEfApi.DtoModel.SystemAdmin;
using VueAndNetCoreEfApi.IRepository.SystemAdmin;
using VueAndNetCoreEfApi.IService.SystemAdmin;
using VueAndNetCoreEfApi.PoModel.SystemAdmin;

namespace VueAndNetCoreEfApi.Service.SystemAdmin
{
   public  class OwnerService:BaseService,IOwnerService
   {
       private IOwnerRepository _ownerRepository;

       public OwnerService(IOwnerRepository Iowner)
       {
           _ownerRepository = Iowner;
       }

       public PagerResult<OwnerPo> GetPageList(SearchModel m)
        {
           return _ownerRepository.GetPageList(m);
       }

       public bool OwnerAdd(OwnerDto Owner)
       {
           return _ownerRepository.OwnerAdd(Owner);
       }

        //删除
        public bool DelOwnerById(int ow_id)
        {
            return _ownerRepository.DelOwnerById(ow_id);
        }

        //返填
        public OwnerPo GetOwnerById(int ow_id)
        {
            return _ownerRepository.GetOwnerById(ow_id);
        }
        //修改
        public bool OwnerUpdate(OwnerPo owner)
        {
            return _ownerRepository.OwnerUpdate(owner);
        }
   }
}
